import QtQuick 2.15
import "./HistoryPage"
Item {
    id: radioHistory
    width: parent.width
    height: parent.height

    property bool cBTCall: false //蓝牙通话标志

    signal loadSearchChannel()

    //RadioHistory UI
    Head{
        id: radioHistoryHead
        anchors{
            top: radioHistory.top
        }
        onLoadSearchChannel: {
            radioHistory.loadSearchChannel()
        }
        width: parent.width
        height: parent.height * 0.1
    }

    Foot{
        id: radioHistoryFoot
        anchors{
            top: radioHistoryHead.bottom
            bottom: radioHistory.bottom
        }
        width: parent.width
        height: parent.height * 0.9

    }


    //蓝牙通话状态
    onCBTCallChanged: {

        if( radioHistory.cBTCall )
        {
            //禁用当前界面
            radioHistoryHead.enabled = false
            radioHistoryFoot.enabled = false
            console.log( "disable" )
        }
        else{
            // 启用当前页面
            radioHistoryHead.enabled = false
            radioHistoryFoot.enabled = false
             console.log( "enable" )
        }
    }
}
